<%@ page contentType="text/html; charset=UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%@ taglib uri="http://displaytag.sf.net" prefix="display"%>
<html>
<head>
</head>
<body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<!-- Save for Web Slices (khutroslide.psd) -->
<div id="fb-root"></div>
<s:form action="logout.action" id="loginForm" method="post">    <input type="hidden" name="signedRequest" id="signedRequest" />
    <input type="hidden" name="isLogout" id="isLogout" />
</s:form>
<script src="http://connect.facebook.net/en_US/all.js"></script>
<script type="text/javascript">
	
	function getinfo() {
		//-----------------------Random-------
	FB.api('/me', function(response) {
	document.getElementById("isLogout").value = 1;
	document.loginForm.submit();
	});
	
	}
	
    window.fbAsyncInit = function () {
        FB.init({
            appId: '418620964854308',
            status: false,
            cookie: true,
            xfbml: true
        });

        
            FB.getLoginStatus(function (response) {
                if (response.status === 'connected') {
                	//FB.logout();
                    getinfo();
                } else {
                	getinfo();
                }
            });  
    };

   
</script>
<h1 style="text-align: center;color: red;">${errorString }</h1>
</body>
</html>